<template>
  <el-switch v-model="cptVal"></el-switch>
</template>

<script>
export default {
  props: {
    value: Number
  },
  computed: {
    cptVal: {
      get() {
        return Boolean(this.value);
      },
      set(val) {
          console.log(val)
        this.$emit("update:value", Number(val));
      }
    }
  }
};
</script>
